package com.shen.jcbf.strbf;

import java.util.Arrays;
import java.util.List;
import java.util.function.Consumer;

public class StringTest2 {

    public static void main(String[] args) {
        List<String> al = Arrays.asList("a", "b", "c", "d");
        al.forEach(StringTest2::printValur);

        Consumer<String> methodParam = StringTest2::printValur; //方法参数
        al.forEach(x -> methodParam.accept(x));//方法执行accept
    }

    public static void printValur(String ss) {
        System.out.println(ss);
    }

}

